def factorial(n):
    if n == 0 or n == 1:
        return 1
    else:
        return n * factorial(n - 1)
sum = 0
for i in range(1, 11):
    sum = sum + factorial(i)
print("1! + 2! + ... + 10! 的和为:", sum)